﻿#pragma once

#include "./PointFeatureHistogramsModel.h"
#include "pcl/includePcl.h"
#include "../common/BasePclProvider.h"

/// <summary>
/// PointFeatureHistogramsProvider
/// </summary>
class PointFeatureHistogramsProvider : public BasePclProvider
{
    Q_OBJECT

public:
    PointFeatureHistogramsProvider();

public:
    void initEditor(QtTreePropertyBrowser* editor);
    void valueChanged(QtProperty*, double) override;
    void valueChanged(QtProperty*, QString) override;
    void valueChanged(QtProperty*, int) override;
    void valueChanged(QtProperty*, bool) override;
    void valueChanged(QtProperty*, const QColor&) override;
    void close() override;
    void doLoadPcd();
    void doAction();

private:
    /**
     * @brief Point Feature Histograms (PFH) descriptors
     * https://pcl.readthedocs.io/projects/tutorials/en/master/pfh_estimation.html
     * data: ???
     * @param cloud
     * @param model
     * @return
     */

    void impl(
        pcl::PointCloud<pcl::PointXYZ>::Ptr cloud,
        pcl::PointCloud<pcl::Normal>::Ptr normals,
        PointFeatureHistogramsModel& model
    );
};
